﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace B.WMS.Migrations
{
    /// <inheritdoc />
    public partial class FLH143253 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Warehousename",
                table: "WMSIOWareHouseRecordModel");

            migrationBuilder.RenameColumn(
                name: "Goodsid",
                table: "WMSIOWareHouseRecordModel",
                newName: "GoodsId");

            migrationBuilder.AlterColumn<string>(
                name: "GoodsId",
                table: "WMSIOWareHouseRecordModel",
                type: "text",
                nullable: false,
                oldClrType: typeof(string),
                oldType: "character varying(18)",
                oldMaxLength: 18);

            migrationBuilder.AddColumn<string>(
                name: "GoodsName",
                table: "WMSIOWareHouseRecordModel",
                type: "text",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<string>(
                name: "LocationId",
                table: "WMSIOWareHouseRecordModel",
                type: "text",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<string>(
                name: "WarehouseId",
                table: "WMSIOWareHouseRecordModel",
                type: "text",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<int>(
                name: "Num",
                table: "WMSGoods",
                type: "integer",
                nullable: false,
                defaultValue: 0);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "GoodsName",
                table: "WMSIOWareHouseRecordModel");

            migrationBuilder.DropColumn(
                name: "LocationId",
                table: "WMSIOWareHouseRecordModel");

            migrationBuilder.DropColumn(
                name: "WarehouseId",
                table: "WMSIOWareHouseRecordModel");

            migrationBuilder.DropColumn(
                name: "Num",
                table: "WMSGoods");

            migrationBuilder.RenameColumn(
                name: "GoodsId",
                table: "WMSIOWareHouseRecordModel",
                newName: "Goodsid");

            migrationBuilder.AlterColumn<string>(
                name: "Goodsid",
                table: "WMSIOWareHouseRecordModel",
                type: "character varying(18)",
                maxLength: 18,
                nullable: false,
                oldClrType: typeof(string),
                oldType: "text");

            migrationBuilder.AddColumn<string>(
                name: "Warehousename",
                table: "WMSIOWareHouseRecordModel",
                type: "character varying(20)",
                maxLength: 20,
                nullable: false,
                defaultValue: "");
        }
    }
}
